home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / magic_ba.swf / scripts / DefineSprite_115 / frame_2 / DoAction.as
Text File  |  2010-11-09  |  1KB  |  48 lines

  1. setProperty(this, _xscale, getProperty(this, _xscale) + 25);
  2. setProperty(this, _yscale, getProperty(this, _yscale) + 25);
  3. ballnumber = 1;
  4. while(ballnumber < _root.totalballs)
  5. {
  6.    nowtesting = "_root.ball" + ballnumber;
  7.    if(this.hitTest(nowtesting) && eval(this add "color") eq eval(nowtesting add "color") && nowtesting != this._name)
  8.    {
  9.       _root.myscore += 1;
  10.       _root.remove += 1;
  11.       removeme += 1;
  12.       set("_root.remove" add _root.remove,nowtesting);
  13.       tellTarget(nowtesting)
  14.       {
  15.          gotoAndStop(2);
  16.       }
  17.    }
  18.    ballnumber++;
  19. }
  20. setProperty(this, _xscale, getProperty(this, _xscale) - 25);
  21. setProperty(this, _yscale, getProperty(this, _yscale) - 25);
  22. if(0 < removeme)
  23. {
  24.    _root.poping += 1;
  25.    _root.dif *= 0.98;
  26.    if(9 < getProperty(_root.roof, _Y))
  27.    {
  28.       lineback = 1;
  29.       while(lineback < _root.totalballs)
  30.       {
  31.          setProperty("_root.ball" add lineback, _Y, getProperty("_root.ball" add lineback, _Y) - 25);
  32.          lineback++;
  33.       }
  34.       setProperty(_root.roof, _Y, getProperty(_root.roof, _Y) - 25);
  35.       setProperty(_root.roofball, _Y, getProperty(_root.roofball, _Y) - 25);
  36.       tellTarget("_root.rooftimer")
  37.       {
  38.          gotoAndPlay(1);
  39.       }
  40.    }
  41.    set("_root.remove" add _root.remove,this._name);
  42.    removeMovieClip(this);
  43.    _root.balls -= 1;
  44.    _root.remove = 0;
  45. }
  46. _root.removelist = 0;
  47. gotoAndStop(1);
  48.